const columns = [{
    prop: 'classFullPathJson',
    label: '类别',
    width: 200
}, {
    prop: 'title',
    label: '名称',
    width: 200
}, {
    prop: 'description',
    label: '说明',
    width: 300
}, {
    prop: 'enabled',
    label: '启用'
}, {
    label: '操作',
    width: 220,
    operations: [{
        prop: 'edit',
        label: '编辑',
        icon: 'el-icon-edit-outline'
    }, {
        prop: 'delete',
        label: '删除',
        icon: 'el-icon-circle-close-outline'
    }]
}]

const options = [{
    value: 'batchrefresh',
    label: '刷新'
}, {
    value: 'batchdelete',
    label: '批量删除'
}]

const enableOptions = [{
    id: true,
    name: '是'
}, {
    id: false,
    name: '否'
}]

const formItems = [{
    label: '文档标题',
    prop: 'title',
    name: 'input',
    validation: true
}, {
    label: '文档类型',
    prop: 'classIds',
    name: 'cascader',
    props: {
        value: 'id',
        label: 'name',
        children: 'subClasses'
    },
    validation: true
}, {
    label: '启用',
    prop: 'enabled',
    name: 'checkbox'
}, {
    label: '文档说明',
    prop: 'description',
    type: 'textarea',
    name: 'input'
}, {
    label: '服务性质',
    prop: 'taskOption',
    type: 'single',
    name: 'checkbox-select',
    options: [{
        label: '必学',
        value: '1'
    }, {
        label: '选学',
        value: '0'
    }]
}, {
    label: '文档文件',
    prop: 'contentFile',
    name: 'upload',
    action: '/api/file/upload',
    uploadFileName: '',
    keyName: 'file',
    oprionTitle: '选择文档',
    cancelTitle: '删除文档',
    validation: true
}, {
   label: '缩略图片',
    prop: 'thumbPic',
    name: 'upload',
    action: '/api/file/upload',
    uploadFileName: '',
    keyName: 'file',
    oprionTitle: '选择图片',
    cancelTitle: '删除图片',
    validation: true
}]

export default {
    columns,
    options,
    enableOptions,
    formItems
}